package com.bawei.park2211a.mine

import androidx.lifecycle.MutableLiveData
import com.bawei.base.bean.CarEntity
import com.bawei.base.bean.VisitEntity
import com.bawei.base.mvvm.BaseViewModel
import com.bawei.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class MineAuditViewModel @Inject constructor(var apiService: ApiService):BaseViewModel(){
    var carSuccess = MutableLiveData<MutableList<CarEntity>>()
    fun car(id: Int) {
        httpRequest({
            apiService.cart(id)
        }, {
            carSuccess.postValue(it)
        })
    }
    var visitList=MutableLiveData<MutableList<VisitEntity>>()
    fun visit(){
        httpRequest({apiService.visit()},{visitList.postValue(it)})
    }
}